#ifndef QPRESSLABEL_H
#define QPRESSLABEL_H
#include <QLabel>

enum PURPOSE{close_window,set_image};

class QPressLabel : public QLabel
{
    Q_OBJECT
private:
    PURPOSE purpose;//当前对象的作用是干什么的？1.close_window 2.set_image
public:
    QPressLabel(QWidget *parent=Q_NULLPTR);
    void mousePressEvent(QMouseEvent *event);
    void setPurpose(PURPOSE purpose);//设置当前对象的作用
signals:
    void closeWindow();
    void setImage();
};

#endif // QPRESSLABEL_H
